package models

import "gorm.io/gorm"

type User struct { //用户表
	gorm.Model
	Username string `gorm:"varchar(50)"`
	Password string `gorm:"varchar(50)"`
}
type Role struct { //角色表
	gorm.Model
	RoleName string `gorm:"varchar(50)"`
}
type UserRole struct { //用户角色关系表
	gorm.Model
	Uid int `gorm:"type:int"`
	Rid int `gorm:"type:int"`
}
type Node struct { //权限表
	gorm.Model
	NodeName string `gorm:"varchar(50)"`
}
type RoleNode struct { //角色权限表
	gorm.Model
	Rid int `gorm:"type:int"`
	Nid int `gorm:"type:int"`
}
type Person struct { //配送员表
	gorm.Model
	PerCode  string `gorm:"varchar(50)"`
	PerName  string `gorm:"varchar(50)"`
	PerPhone string `gorm:"varchar(50)"`
}
type PersonOrder struct { //配送订单
	gorm.Model
	OrderCode string `gorm:"varchar(50)"`
	OrderTo   string `gorm:"varchar(50)"`
	Pid       int    `gorm:"type:int"`
}
type PerSonOrderList struct {
	OrderId   int
	OrderCode string
	OrderTo   string
	PerCode   string
	PerName   string
	PerPhone  string
}
